(function ($) {
    //alert('aaa');
    $.miniAlert = function (content,delayTime) {
        var $dialoghtml= $("<div  title=\"点击关闭\" style=\"font-size:0.8em;text-align:center;padding:15px; min-width:100px;position: fixed;overflow: auto;background-color: white;border: 1px solid #999;"
            +"border: 1px solid rgba(0, 0, 0, 0.3);-webkit-border-radius: 6px;-moz-border-radius: 6px;border-radius: 4px;"
            +"-webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);"
            +"-webkit-background-clip: padding-box;-moz-background-clip: padding-box;background-clip: padding-box;z-index: 20000;\">"
            +content
            +"</div>");
        $("body").append($dialoghtml);
        $dialoghtml.on("click",function(){
            $dialoghtml.remove();
        });
        $dialoghtml.show();   
        var height= $(window).height()/2-$dialoghtml.height()/2;
        var width=$(window).width()/2-$dialoghtml.width()/2;
        $dialoghtml.css({
            position:"fixed",
            top:height,
            left:width
        });
        
        if(delayTime>0)
        {
            //淡出后删除该元素
           $dialoghtml.delay(delayTime).fadeOut(2000,function(){
               $dialoghtml.remove();
           });
           
        }
    }
})(jQuery);